<<<<<<< HEAD
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <!-- TopJUI框架样式 -->
    <link type="text/css" href="${pageContext.request.contextPath}/TopJUI/topjui/css/topjui.core.min.css" rel="stylesheet">
    <link type="text/css" href="${pageContext.request.contextPath}/TopJUI/topjui/themes/default/topjui.red.css" rel="stylesheet" id="dynamicTheme"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/TopJUI/ztree/css/demo.css">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/TopJUI/ztree/css/metroStyle/metroStyle.css">
    <!-- FontAwesome字体图标 -->
    <link type="text/css" href="${pageContext.request.contextPath}/TopJUI/static/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
    <!-- layui框架样式 -->
    <link type="text/css" href="${pageContext.request.contextPath}/TopJUI/static/plugins/layui/css/layui.css" rel="stylesheet"/>
    <!-- jQuery相关引用 -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/static/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/static/plugins/jquery/jquery.cookie.js"></script>
    <!-- TopJUI框架配置 -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/static/public/js/topjui.config.js"></script>
    <!-- TopJUI框架核心-->
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/topjui/js/topjui.core.min.js"></script>
    <!-- TopJUI中文支持 -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/topjui/js/locale/topjui.lang.zh_CN.js"></script>
    <!-- layui框架js -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/static/plugins/layui/layui.js" charset="utf-8"></script>
    <!-- ztree框架js -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/ztree/js/jquery.ztree.core.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/ztree/js/jquery.ztree.excheck.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/ztree/js/jquery.ztree.exedit.js"></script>
	
	<script type="text/javascript">
		var setting = {
			check: {
				enable: true
			},
			data: {
				simpleData: {
					enable: true
				}
			},
            callback:{
                onCheck:onCheck
            }
		};

 		var zNodes =[
 			{ id:1, pId:0, name:"北京总部", open:true},
 			{ id:11, pId:1, name:"总公司负责人1", open:false},
 			{ id:111, pId:11, name:"员工1"},
 			{ id:112, pId:11, name:"员工2"},
 			{ id:12, pId:1, name:"总公司负责人2", open:false},
 			{ id:121, pId:12, name:"员工3"},
 			{ id:122, pId:12, name:"员工4"},
 			
			{ id:2, pId:0, name:"西安分公司", checked:false, open:false},
 			{ id:21, pId:2, name:"分公司部门负责人1"},
 			{ id:22, pId:2, name:"分公司部门负责人2", open:false},
 			{ id:221, pId:22, name:"员工1", checked:false},
 			{ id:222, pId:22, name:"员工2"},
 			{ id:23, pId:2, name:"分公司部门负责人3"},
			
 			{ id:3, pId:0, name:"重庆分公司", checked:false, open:false},
 			{ id:231, pId:3, name:"分公司部门负责人1"},
 			{ id:232, pId:3, name:"分公司部门负责人2", open:false},
 			{ id:2321, pId:232, name:"员工1", checked:false},
 			{ id:2322, pId:232, name:"员工2"},
 			{ id:233, pId:3, name:"分公司部门负责人3"}		
 		];
		var code;
		function setCheck() {
			var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
			py = $("#py").attr("checked")? "p":"",
			sy = $("#sy").attr("checked")? "s":"",
			pn = $("#pn").attr("checked")? "p":"",
			sn = $("#sn").attr("checked")? "s":"",
			type = { "Y":py + sy, "N":pn + sn};
			zTree.setting.check.chkboxType = type;
			// showCode('setting.check.chkboxType = { "Y" : "' + type.Y + '", "N" : "' + type.N + '" };');
			// sshowCode('setting.check.chkboxType = { "Y" : "", "N" : "" };');
			showCode('setting.check.chkboxType = { "Y" : "s", "N" : "ps" };');
			// setting.check.chkboxType = { "Y" : "", "N" : "" };
		}
		function showCode(str) {
			if (!code) code = $("#code");
			code.empty();
			code.append("<li>"+str+"</li>");
		}
		
		/* 
			var zNodes =[];
			$(document).ready(function(){
				var t = $("#treeDemo");
				$.ajax({
			    	type: "POST", 
					url: "/Units/ListTree",
			        dataType: 'json',
					success: function(result) { 
						console.log(result);
						$.extend( true, zNodes, result );
						console.log(zNodes);
			             t = $.fn.zTree.init(t, setting, zNodes);
						// demoIframe = $("#testIframe");
					} 
			    });
			}); 
		*/
		
		$(document).ready(function(){
			$.fn.zTree.init($("#treeDemo"), setting, zNodes);
			setCheck();
			$("#py").bind("change", setCheck);
			$("#sy").bind("change", setCheck);
			$("#pn").bind("change", setCheck);
			$("#sn").bind("change", setCheck);
			
 		});
		
		function onCheck(e,treeId,treeNode){
            var treeObj=$.fn.zTree.getZTreeObj("treeDemo"),
            nodes=treeObj.getCheckedNodes(true),
            v="";
            for(var i=0;i<nodes.length;i++){
            v+=nodes[i].name + ",";
            alert(nodes[i].id); //获取选中节点的值
            }
		}
	</script>
</head>

<body>
<form class="hidden" method="post" data-toggle="topjui-form" data-options="id:'formId'">
    <input type="hidden" id="uuid" name="uuid">
    <input type="hidden" name="password">
    <table class="editTable" style="width:800px; border: 1px solid #CCCCCC">
        <tr>
            <td colspan="4">
                <div class="divider">
	                <center>
	                    <span>发票</span>
	                </center>
                </div>
            </td>
        </tr>
        <tr>
            <td class="label">审批类型：</td>
            <td>
                <input type="text" name="country"
                       data-toggle="topjui-combobox"
                       data-options="panelHeight:250,
                       url:_ctx + '/json/combobox/country.json',
                       valueField: 'id',
                       childCombobox:{
                           id:'province',
                           url:remoteHost+'/system/codeItem/getListByPid?pid={parentValue}'
                       }">
            </td>
        </tr>
        <tr>
        	<td class="label">申请部门：</td>
            <td>
                <input type="text" name="country"
                       data-toggle="topjui-combobox"
                       data-options="panelHeight:250,
                       url:_ctx + '/json/combobox/country.json',
                       valueField: 'id',
                       childCombobox:{
                           id:'province',
                           url:remoteHost+'/system/codeItem/getListByPid?pid={parentValue}'
                       }">
            </td>
        </tr>
        <tr>
            <td class="label">发票日期：</td>
            <td><input type="text" name="birthday" data-toggle="topjui-datebox"></td>
        </tr>
        <tr>
        	<td class="label">发票号：</td>
            <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
            <td class="label">关联收付款单：</td>
            <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
        	<td class="label">项目号：</td>
            <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
            <td class="label">合同金额：</td>
            <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
        	<td class="label">已开票金额：</td>
			<td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
        	<td class="label">未开票金额：</td>
	        <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
        	<td class="label">开票金额：</td>
            <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
        	<td class="label">税率：</td>
            <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
	        <td colspan="2">
	        	<a style="margin-left: 400px" href="/BaseFrame/TopJUI/html/complex/datagrid3.jsp" data-toggle="topjui-linkbutton" data-options="id:'submitBtn',iconCls:'fa fa-save',
                   form:{
                       id:'formId',
                       method:'submit',
                       url:'/json/response/success.json',
                       refreshRefererTab:true,
                       refreshCurrentTab:true
                   }">保存</a>
	        </td>
    	</tr>
    </table>
</form>
</body>
=======
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <!-- TopJUI框架样式 -->
    <link type="text/css" href="${pageContext.request.contextPath}/TopJUI/topjui/css/topjui.core.min.css" rel="stylesheet">
    <link type="text/css" href="${pageContext.request.contextPath}/TopJUI/topjui/themes/default/topjui.red.css" rel="stylesheet" id="dynamicTheme"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/TopJUI/ztree/css/demo.css">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/TopJUI/ztree/css/metroStyle/metroStyle.css">
    <!-- FontAwesome字体图标 -->
    <link type="text/css" href="${pageContext.request.contextPath}/TopJUI/static/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
    <!-- layui框架样式 -->
    <link type="text/css" href="${pageContext.request.contextPath}/TopJUI/static/plugins/layui/css/layui.css" rel="stylesheet"/>
    <!-- jQuery相关引用 -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/static/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/static/plugins/jquery/jquery.cookie.js"></script>
    <!-- TopJUI框架配置 -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/static/public/js/topjui.config.js"></script>
    <!-- TopJUI框架核心-->
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/topjui/js/topjui.core.min.js"></script>
    <!-- TopJUI中文支持 -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/topjui/js/locale/topjui.lang.zh_CN.js"></script>
    <!-- layui框架js -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/static/plugins/layui/layui.js" charset="utf-8"></script>
    <!-- ztree框架js -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/ztree/js/jquery.ztree.core.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/ztree/js/jquery.ztree.excheck.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/TopJUI/ztree/js/jquery.ztree.exedit.js"></script>
	
	<script type="text/javascript">
		var setting = {
			check: {
				enable: true
			},
			data: {
				simpleData: {
					enable: true
				}
			},
            callback:{
                onCheck:onCheck
            }
		};

 		var zNodes =[
 			{ id:1, pId:0, name:"北京总部", open:true},
 			{ id:11, pId:1, name:"总公司负责人1", open:false},
 			{ id:111, pId:11, name:"员工1"},
 			{ id:112, pId:11, name:"员工2"},
 			{ id:12, pId:1, name:"总公司负责人2", open:false},
 			{ id:121, pId:12, name:"员工3"},
 			{ id:122, pId:12, name:"员工4"},
 			
			{ id:2, pId:0, name:"西安分公司", checked:false, open:false},
 			{ id:21, pId:2, name:"分公司部门负责人1"},
 			{ id:22, pId:2, name:"分公司部门负责人2", open:false},
 			{ id:221, pId:22, name:"员工1", checked:false},
 			{ id:222, pId:22, name:"员工2"},
 			{ id:23, pId:2, name:"分公司部门负责人3"},
			
 			{ id:3, pId:0, name:"重庆分公司", checked:false, open:false},
 			{ id:231, pId:3, name:"分公司部门负责人1"},
 			{ id:232, pId:3, name:"分公司部门负责人2", open:false},
 			{ id:2321, pId:232, name:"员工1", checked:false},
 			{ id:2322, pId:232, name:"员工2"},
 			{ id:233, pId:3, name:"分公司部门负责人3"}		
 		];
		var code;
		function setCheck() {
			var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
			py = $("#py").attr("checked")? "p":"",
			sy = $("#sy").attr("checked")? "s":"",
			pn = $("#pn").attr("checked")? "p":"",
			sn = $("#sn").attr("checked")? "s":"",
			type = { "Y":py + sy, "N":pn + sn};
			zTree.setting.check.chkboxType = type;
			// showCode('setting.check.chkboxType = { "Y" : "' + type.Y + '", "N" : "' + type.N + '" };');
			// sshowCode('setting.check.chkboxType = { "Y" : "", "N" : "" };');
			showCode('setting.check.chkboxType = { "Y" : "s", "N" : "ps" };');
			// setting.check.chkboxType = { "Y" : "", "N" : "" };
		}
		function showCode(str) {
			if (!code) code = $("#code");
			code.empty();
			code.append("<li>"+str+"</li>");
		}
		
		/* 
			var zNodes =[];
			$(document).ready(function(){
				var t = $("#treeDemo");
				$.ajax({
			    	type: "POST", 
					url: "/Units/ListTree",
			        dataType: 'json',
					success: function(result) { 
						console.log(result);
						$.extend( true, zNodes, result );
						console.log(zNodes);
			             t = $.fn.zTree.init(t, setting, zNodes);
						// demoIframe = $("#testIframe");
					} 
			    });
			}); 
		*/
		
		$(document).ready(function(){
			$.fn.zTree.init($("#treeDemo"), setting, zNodes);
			setCheck();
			$("#py").bind("change", setCheck);
			$("#sy").bind("change", setCheck);
			$("#pn").bind("change", setCheck);
			$("#sn").bind("change", setCheck);
			
 		});
		
		function onCheck(e,treeId,treeNode){
            var treeObj=$.fn.zTree.getZTreeObj("treeDemo"),
            nodes=treeObj.getCheckedNodes(true),
            v="";
            for(var i=0;i<nodes.length;i++){
            v+=nodes[i].name + ",";
            alert(nodes[i].id); //获取选中节点的值
            }
		}
	</script>
</head>

<body>
<form class="hidden" method="post" data-toggle="topjui-form" data-options="id:'formId'">
    <input type="hidden" id="uuid" name="uuid">
    <input type="hidden" name="password">
    <table class="editTable" style="width:800px; border: 1px solid #CCCCCC">
        <tr>
            <td colspan="4">
                <div class="divider">
	                <center>
	                    <span>发票</span>
	                </center>
                </div>
            </td>
        </tr>
        <tr>
            <td class="label">审批类型：</td>
            <td>
                <input type="text" name="country"
                       data-toggle="topjui-combobox"
                       data-options="panelHeight:250,
                       url:_ctx + '/json/combobox/country.json',
                       valueField: 'id',
                       childCombobox:{
                           id:'province',
                           url:remoteHost+'/system/codeItem/getListByPid?pid={parentValue}'
                       }">
            </td>
        </tr>
        <tr>
        	<td class="label">申请部门：</td>
            <td>
                <input type="text" name="country"
                       data-toggle="topjui-combobox"
                       data-options="panelHeight:250,
                       url:_ctx + '/json/combobox/country.json',
                       valueField: 'id',
                       childCombobox:{
                           id:'province',
                           url:remoteHost+'/system/codeItem/getListByPid?pid={parentValue}'
                       }">
            </td>
        </tr>
        <tr>
            <td class="label">发票日期：</td>
            <td><input type="text" name="birthday" data-toggle="topjui-datebox"></td>
        </tr>
        <tr>
        	<td class="label">发票号：</td>
            <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
            <td class="label">关联收付款单：</td>
            <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
        	<td class="label">项目号：</td>
            <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
            <td class="label">合同金额：</td>
            <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
        	<td class="label">已开票金额：</td>
			<td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
        	<td class="label">未开票金额：</td>
	        <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
        	<td class="label">开票金额：</td>
            <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
        	<td class="label">税率：</td>
            <td ><input type="text" name="userNameId" value="" data-toggle="topjui-textbox"></td>
        </tr>
        <tr>
	        <td colspan="2">
	        	<a style="margin-left: 400px" href="/BaseFrame/TopJUI/html/complex/datagrid3.jsp" data-toggle="topjui-linkbutton" data-options="id:'submitBtn',iconCls:'fa fa-save',
                   form:{
                       id:'formId',
                       method:'submit',
                       url:'/json/response/success.json',
                       refreshRefererTab:true,
                       refreshCurrentTab:true
                   }">保存</a>
	        </td>
    	</tr>
    </table>
</form>
</body>
>>>>>>> branch 'master' of https://gitee.com/hpf1092261662/beijing_mission_edition.git
</html>